﻿<Window x:Class="iMagistic.FacebookModule"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:local ="clr-namespace:iMagistic"
        Title="FacebookModule" Height="320" Width="556" Loaded="Window_Loaded"  WindowStyle="None" WindowStartupLocation="CenterScreen" ShowInTaskbar="True">
    <Window.Resources>
        <ControlTemplate x:Key="closeBtn" TargetType="{x:Type Button}">
            <Grid>
                <ContentPresenter VerticalAlignment="Center" HorizontalAlignment="Center"/>
                <Image  HorizontalAlignment="Left" Name="closeimg"  VerticalAlignment="Top"  Source="images/FcBclose.png" Stretch="None" />
            </Grid>
            <ControlTemplate.Triggers>
                <Trigger Property="IsMouseOver" Value="True">
                    <Setter Property="Source" Value="images/FcBclose_hover.png" TargetName="closeimg"/>
                </Trigger>
            </ControlTemplate.Triggers>
        </ControlTemplate>

    </Window.Resources>
    <Grid Background="Black">
        <Border BorderThickness="15" CornerRadius="10" BorderBrush="#FF616161">
            <Grid Background="White">

                <Grid.RowDefinitions>
                    <RowDefinition Height="34" />
                    <RowDefinition Height="248*" />
                </Grid.RowDefinitions>
                <Grid Grid.Row="0" Name="grid1" Background="#3B5998">
                    <Label Content="Authentication" HorizontalAlignment="Left" Margin="110,6,0,0" Name="DialogName" VerticalAlignment="Top" Foreground="White" FontSize="15" FontFamily="Arial" />
                    <Image Height="33" HorizontalAlignment="Left" Margin="0,0,0,0" Name="logo" Stretch="Fill" VerticalAlignment="Top" Width="105" Source="/Images/logoFacebook.jpg" />
                    <Button Template="{DynamicResource closeBtn}" Height="33" HorizontalAlignment="Right" Margin="0,0,0,0" Name="button1" VerticalAlignment="Top" Width="33" Click="closeBtn_Click" />
                </Grid>
                <Grid Grid.Row="1" Background="White">
                    <Grid Name="browsingGrid" >
                        <WebBrowser
                               HorizontalAlignment="Stretch" Name="webBrowser" VerticalAlignment="Stretch" Navigated="webBrowser_Navigated" Visibility="Hidden" LoadCompleted="webBrowser_LoadCompleted">
                        </WebBrowser>
                        <Label Content="Loading..." Grid.RowSpan="2" Height="28" HorizontalAlignment="Center" Margin="0,100,0,0" Name="label1" VerticalAlignment="Center" FontSize="16" Foreground="#FF3C4D6C" Background="White" />
                        <Image local:ImageBehavior.AnimatedSource="/Images/facebook.gif"  Height="20" HorizontalAlignment="Center" Margin="0,0,0,0" Name="image1" Stretch="Fill" VerticalAlignment="Center" Width="160"/>
                    </Grid>
                    <Grid Name="downloadingGrid" Visibility="Collapsed">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="172" />
                            <ColumnDefinition Width="332" />
                        </Grid.ColumnDefinitions>
                        <Image Height="128" HorizontalAlignment="Center" Name="image2" Stretch="Fill" VerticalAlignment="Top" Width="128" Source="/Images/download.png" Margin="0,24,0,0" />
                        <Grid Grid.Column="1">
                            <Label Content="Downloading photos" HorizontalAlignment="Left" Margin="-4,17,0,0" Name="header" FontSize="24" FontWeight="Normal" Foreground="#FF3B5998" Width="241" Height="40" VerticalAlignment="Top" />
                            <Label Content="folderName" FontSize="14" FontWeight="Bold" Foreground="#FF3B5998" Height="28" HorizontalAlignment="Center" Margin="89,53,59,0" Name="folderName" VerticalAlignment="Top" Width="184"  />
                            <Label Content="X out of Y" FontSize="14" FontWeight="Bold" Foreground="#FF3B5998" Height="28" HorizontalAlignment="Center" Margin="109,87,96,0" Name="amount" VerticalAlignment="Top" Width="127" />
                            <ProgressBar Height="31" HorizontalAlignment="Left" Margin="-2,112,0,0" Name="progressBar" VerticalAlignment="Top" Width="306" Value="0" />
                            <Label Content="from folder:" FontSize="14" FontWeight="Bold" Foreground="#FF3B5998" Height="28" HorizontalAlignment="Left" Margin="-2,53,0,0" Name="label2" VerticalAlignment="Top" />
                        </Grid>
                    </Grid>

                </Grid>
            </Grid>

        </Border>
    </Grid>
</Window>
